package com.example.demo.controller;

import com.example.demo.entity.ClassInfo;
import com.example.demo.service.ClassInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("cls")
public class ClassInfoController {
  @Autowired
    private ClassInfoService classInfoService;

  //http:localhost:8080/cls/list
  @GetMapping("list")
    public List<ClassInfo> queryAllClassInfolist() {
      return classInfoService.getClassInfo();
  }
}

/**
 * GET ALL courseinfo data
 * @return
 */

//  //http:localhost:8080/cls/list
//  @GetMapping("list")
// @http:123456gyl


